<html>
<head>
<link rel="stylesheet" rev="stylesheet"
	href="__PUBLIC__/admin/css/style.css" type="text/css" media="all" />
<style>
.page_tit {
	font-size: 14px;
	font-weight: bold;
	color: #1e325c;
	line-height: 40px;
}

.so_main {
	text-align: left;
	margin: 0 10px;
}

.form2 {
	padding-top: 10px;
	border-top: 2px solid #9cb8cc;
}

.form2 h3 {
	line-height: 30px;
	font-size: 12px;
	color: #333;
	border-bottom: 1px solid #9cb8cc;
	margin: 10px 0
}

.form2 dl {
	
}

.form2 dt {
	float: left;
	margin: 0;
	padding: 8px 0 0;
	text-align: right;
	width: 170px;
	color: #333
}

.form2 dt span {
	color: #F00
}

.form2 dd {
	margin-left: 175px;
	padding: 8px 0 8px 5px;
	vertical-align: middle
}

.form2 p {
	color: #7d7d7d;
	line-height: 20px;
	margin: 0;
	padding: 0
}

.form2 label {
	padding-left: 5px
}

.page_btm {
	padding: 10px 0;
	border-top: 1px solid #9cb8cc;
	text-align: center
}
</style>
</head>
<body>

	<div class="so_main">
		<div class="page_tit">
			<eq name="type" value="edit">编辑线路<else />添加线路</eq>
		</div>

		<eq name="type" value="add">
		<form id="baseForm" name="baseForm" method="post" action="{:U('Admin/doAddLine')}">
			<else />
			<form id="baseForm" name="baseForm" method="post" action="{:U('Admin/doEditLine')}">
				<input type="hidden" name="line_id" value="{$lines[0]['line_id']}" />
		</eq>

		<div class="form2">
			<dl class="lineD">
				<dt>线路名称：</dt>
				<dd>
					<input name="line_name" id="line_name" type="text"
						value="{$lines[0]['name']}">
					<p>线路的名称描述</p>
			</dl>

			<dl class="lineD">
				<dt>巡检员：</dt>
				<dd>
					<td><select name="inspector_id">
							<volist name="inspector" id="vo"> <eq
								name="inspector_id" value="$vo.inspector_id">
							<option selected value="{$vo.inspector_id}">{$vo.name}</option>
							<else />
							<option value="{$vo.inspector_id}">{$vo.name}</option>
							</eq> </volist>

					</select></td>
					<p>负责巡检的巡检员</p>
			</dl>


			<dl class="lineD">
				<dd>
					<input name="node_amount" id="node_amount" type="hidden"
						value="{$lines[0]['node_amount']}">
					<p></p>
			</dl>
<input type="button" value="提交"  onclick="check();"/>
			<div class="page_btm">
			</div>
		</div>
		</form>
	</div>


</body>
</html>
<script type="text/javascript">
function check(){
	var name = document.getElementById('line_name').value;
	if(name == ""){
		alert('管线名称不可为空！');
		document.baseForm.line_name.focus();
	} else{
		document.baseForm.submit();
	}
}
</script>
